package com.d0324;

import java.util.Random;

public class RandomTest {
    public static void main(String[] args) {
        Random random=new Random(5L);//参数相同产生的随机数相同,long类型
        Random random1=new Random(5L);
        System.out.println(random1.nextDouble());
        //System.out.println(random.nextInt());
        //System.out.println(random.nextInt(100));//不包括
        //System.out.println(random.nextLong());
        //System.out.println(random.nextFloat());
        System.out.println(random.nextDouble());
        //System.out.println(random.nextBoolean());
        //random.setSeed(2L);
    }
}
